package pl.edu.agh.pros.proxy.rest;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

import pl.edu.agh.pros.proxy.logic.dao.register.RegisteredClientDAO;
import pl.edu.agh.pros.proxy.logic.dao.register.RegisteredTopicDAO;

@Path("/cron")
public class CronService {

	@GET
	@Path("/clear_users")
	public void clear_users() {
		System.out.println("called clear_users");
		RegisteredClientDAO.getInstance().clearExpiredUsers();
	}

	@GET
	@Path("/clear_topics")
	public void clear_topics() {
		System.out.println("called clear_topics");
		RegisteredTopicDAO.getInstance().clearExpiredTopics();
	}

}
